<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of performHistoneClustering_Fig4CD</title>
  <meta name="keywords" content="performHistoneClustering_Fig4CD">
  <meta name="description" content="Creates a cluster tree and heatmap of histone modification data (GM06990, chrm 7)">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">code</a> &gt; <a href="index.html">examples</a> &gt; performHistoneClustering_Fig4CD.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for code\examples&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>performHistoneClustering_Fig4CD
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>Creates a cluster tree and heatmap of histone modification data (GM06990, chrm 7)</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function performHistoneClustering_Fig4CD() </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Creates a cluster tree and heatmap of histone modification data (GM06990, chrm 7)

 performClustering() creates the cluster tree and heatmap of the histone
 modification data saved in 'GM06990chips_chrm7_RegionsView.mat'. This
 mode of visualization enables to identify group of genes with similar
 histone modification patterns accross the chr. 7 in GM06990, a cancer
 cell line.
 The dataset for clustering was built by integrating data from 3 different
 DAS sources: UCSC Encode, Havana Genes and Genetic Association Database.

 SYNTAX: [] = performHistoneClustering()

 See also assembleHistoneDSforClustering(), assembleHistoneDS()

    DASMiner: DAS library and browser for Matlab.
    Diogo Veiga, Jan 2009.</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function performHistoneClustering_Fig4CD()</a>
0002 <span class="comment">% Creates a cluster tree and heatmap of histone modification data (GM06990, chrm 7)</span>
0003 <span class="comment">%</span>
0004 <span class="comment">% performClustering() creates the cluster tree and heatmap of the histone</span>
0005 <span class="comment">% modification data saved in 'GM06990chips_chrm7_RegionsView.mat'. This</span>
0006 <span class="comment">% mode of visualization enables to identify group of genes with similar</span>
0007 <span class="comment">% histone modification patterns accross the chr. 7 in GM06990, a cancer</span>
0008 <span class="comment">% cell line.</span>
0009 <span class="comment">% The dataset for clustering was built by integrating data from 3 different</span>
0010 <span class="comment">% DAS sources: UCSC Encode, Havana Genes and Genetic Association Database.</span>
0011 <span class="comment">%</span>
0012 <span class="comment">% SYNTAX: [] = performHistoneClustering()</span>
0013 <span class="comment">%</span>
0014 <span class="comment">% See also assembleHistoneDSforClustering(), assembleHistoneDS()</span>
0015 <span class="comment">%</span>
0016 <span class="comment">%    DASMiner: DAS library and browser for Matlab.</span>
0017 <span class="comment">%    Diogo Veiga, Jan 2009.</span>
0018 
0019 load GM06990chips_chrm7_RegionsView.mat regions;
0020 
0021 data = [];
0022 labelIdx = [];
0023 
0024 <span class="comment">%Clustering only regions that have measurement in the following chips</span>
0025 <span class="comment">%Largest set of regions with histone modifications mesasured is the</span>
0026 <span class="comment">%following:</span>
0027 chips = {<span class="string">'GM06990H3K4me1'</span>;<span class="string">'GM06990H3K4me2'</span>; <span class="string">'GM06990H3K4me3'</span>;<span class="string">'GM06990H3ac'</span>;<span class="keyword">...</span>
0028           <span class="string">'GM06990H4ac'</span>};
0029      
0030 <span class="keyword">for</span> i=1:size(regions,2)
0031    
0032     <span class="keyword">if</span> (strcmp(char(regions(i).samples),char(chips)))
0033         labelIdx = [labelIdx i];
0034         data = [data regions(i).values];
0035     <span class="keyword">end</span>
0036 <span class="keyword">end</span>
0037 columnLabels = {regions.label}';
0038 columnLabels = columnLabels(labelIdx);
0039 
0040 <span class="keyword">for</span> i=1:size(columnLabels)
0041     
0042     <span class="keyword">if</span> (~isempty(regions(labelIdx(i)).geneSymbol))
0043         columnLabels{i} = [columnLabels{i} <span class="string">' '</span> regions(labelIdx(i)).geneSymbol];
0044     <span class="keyword">end</span>
0045     
0046     <span class="keyword">if</span> (~isempty(regions(labelIdx(i)).cancerTypes))
0047         columnLabels{i} = [columnLabels{i} <span class="string">' '</span> regions(labelIdx(i)).cancerTypes];
0048     <span class="keyword">end</span>
0049 <span class="keyword">end</span>
0050 
0051 rowLabels = cellstr(regions(1).samples);
0052 cg_s = clustergram(data, <span class="string">'RowLabels'</span>, rowLabels,<span class="keyword">...</span>
0053                                <span class="string">'ColumnLabels'</span>, columnLabels,<span class="keyword">...</span>
0054                                <span class="string">'RowPdist'</span>, <span class="string">'euclidean'</span>, <span class="keyword">...</span>
0055                                <span class="string">'Cluster'</span>, 2, <span class="keyword">...</span>
0056                                <span class="string">'ColumnPdist'</span>,<span class="string">'euclidean'</span>, <span class="keyword">...</span>
0057                                <span class="string">'Impute'</span>, @knnimpute);
0058                      
0059 set(cg_s,<span class="string">'Colormap'</span>,redbluecmap);
0060 
0061 4
0062 
0063 <span class="comment">% cm = struct('GroupNumber',{1191,1185,598},'Annotation',{'A','B','C'},...</span>
0064 <span class="comment">%      'Color',{'b','m','y'});</span>
0065 <span class="comment">%  set(cg_s,'ColumnMarker',cm)</span>
0066  
0067 
0068 <span class="comment">%Use &quot;export group to workspace&quot; to create a new dendogram for the group</span>
0069 <span class="comment">%and then run view(groupXX)</span></pre></div>
<hr><address>Generated on Tue 17-Feb-2009 16:59:45 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>